/** init domain config */
import './config'
import Vue from 'vue'
import App from './App.vue'
import Storage from 'vue-ls'
import router from './router'
import store from './store'
import { VueAxios } from "./axios"

import Antd, { version } from 'ant-design-vue'  // 引入组件库
console.log('ant-design-vue version:', version)
import 'ant-design-vue/dist/antd.css' // 引入样式表
import '@/assets/less/common.less'

import '@/permission' // permission control
import components from '@/components'
import config from '@/defaultSettings'
import { ACCESS_TOKEN } from "@/store/mutation-types"

Vue.config.productionTip = false
Vue.use(Storage, config.storageOptions)
Vue.use(Antd)
Vue.use(components)
Vue.use(VueAxios, router)

new Vue({
  router,
  store,
  mounted () {
    store.commit('SET_TOKEN', Vue.ls.get(ACCESS_TOKEN))
  },
  render: h => h(App),
}).$mount('#app')
